<?php
/*
*
* BEGIN DatabaseAdapterInterface.php
*
*
* @Description: This is an interface to be implemented by any class interacting with the underlying RDBMS
* @Authors: Alejandro Gervasio, Developer Shed
* @Copyright: © Developer Shed 2003-2011 - All Rights Reserved
*
*
* BEGIN CHANGELOG
* Developers working on thee files are REQUIRED to maintain this CHANGELOG.
* Please ensure you follow the Changelog Guidelines: http://code.google.com/p/dazzler/wiki/DazzlerDevelopGuideline?ts=1315476570&updated=DazzlerDevelopGuideline
* !==================================================================================================================================================================
*
* VERSION 1.0.0
*	+ File Created, Thato Selebogo, 19 September 2011
*
* ==================================================================================================================================================================!
* END CHANGELOG
*/


/*******************************************************************************************************************************************************************
*
* BEGIN Direct Call Check
*
/******************************************************************************************************************************************************************/
global $doNotCallThisScriptDirectly;
if ($doNotCallThisScriptDirectly != 1)
{
	/* Read the ini language file */
	$ini_lang_array = array();
	$clientlang = explode(",", strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']));
	$lang_ini_array = (file_exists("lang/" . trim($clientlang[0]) . ".ini")) ? parse_ini_file("lang/" . trim($clientlang[0]) . ".ini", true) : parse_ini_file("lang/en.ini", true);
	die ($lang_ini_array['ERRORS']['doNotCallThisScriptDirectly']);
}
/*******************************************************************************************************************************************************************
*
* END Direct Call Check
*
/******************************************************************************************************************************************************************/
interface DatabaseAdapterInterface
{
    public function connect();

    public function disconnect();

    public function query($query);

    public function fetch();

    public function select($table, $where, $fields, $order, $limit, $offset);

    public function insert($table, array $data);

    public function update($table, array $data, $where);

    public function delete($table, $where);

    public function getInsertId();

    public function countRows();

    public function getAffectedRows();
}

/*
*
* END DatabaseAdapterInterface.php
*
*/

?>

